home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: new-news.sprintlink.net!eskimo!scs
- From: scs@eskimo.com (Steve Summit)
- Subject: FAQ list overspecificity (was: Very Simple <maths.h> problem...)
- X-Nntp-Posting-Host: eskimo.com
- Message-ID: <DpAtJz.5z5@eskimo.com>
- Sender: news@eskimo.com (News User Id)
- Organization: schmorganization
- References: <4jf0c9$rs8@nic.umass.edu> <315B11FD.6460@oc.com>
- Date: Wed, 3 Apr 1996 18:19:10 GMT
-
- In article <315B11FD.6460@oc.com>, Larry Weiss <lfw@oc.com> writes:
- > Eugene K Hall wrote:
- >> ld: Unresolved: exp
- >
- > The answer can be found by extrapolating from this comp.lang.c FAQ entry:
- >
- > 14.3: I'm trying to do some simple trig, and I am #including <math.h>,
- > but I keep getting "undefined: sin" compilation errors.
- >
- > A: Make sure you're actually linking with the math library. For
- > instance, under Unix, you usually need to use the -lm option...
- >
- > Personally, I wish 14.3 were worded more inclusively (there's more than
- > just trig entry points affected).
-
- Indeed. The cited question is one of the ones (there are
- several) which is deficient because it tries to maintain a
- semblance of reality, that is, to be worded as real questions
- posted to the net are worded. No one asks, "Why is the linker
- complaining that sqrt, or sin, or cos, or tan, or exp, or asin,
- or atan, or log, or pow is undefined?", so the FAQ list doesn't,
- either. (Dave Barry has some advice for getting yourself out of
- tedious meetings: "...[H]ave an accomplice interrupt the meeting
- and announce that you have a phone call from somebody very
- important, such as the president of the company, or the Pope.
- It should be either one or the other. It would sound fishy if
- the accomplice said, `You have a call from the president of the
- company. Or the Pope.'")
-
- The upside of the question as it's currently worded is that it
- appeals to the FAQ maintainer's sense of how the game ought to be
- played. The downsides are that someone who knows he's not
- "trying to do some simple trig," or who is searching mechanically
- for the name of the one <math.h> routine he *is* having problems
- with, may overlook question 14.3.
-
- I *do* assume, and hope, that someone reading 14.3 can
- extrapolate to other <math.h> functions. Perhaps I doth assume
- too much. Comments?
-
- Steve Summit
- scs@eskimo.com
-